import axios from 'axios'

import qs from 'qs';



//get  请求 封装
 export  function getData(url='', data={}) {
     console.log(data)
    return axios.get(url, {
        params: data
    }).then(res=>res.data)

}



// post 请求 
export  function postData(url='', data={}) {
   
    return axios.post(url, {
        data: qs.stringify(data),
        headers: { 'content-type': 'application/x-www-form-urlencoded' }
    }).then(res=>res.data)
}









